-- GENERATED SPELL FOR [Avian Warhawk] --


function spell0_21904(pUnit, Event) --@Carnivorous Bite,n/a--
pUnit:FullCastSpellOnTarget(32901,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21904', 15000, 1)
end

function spell1_21904(pUnit, Event) --@Sonic Charge,n/a--
pUnit:FullCastSpellOnTarget(38059,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21904', 585, 1)
end

function spell2_21904(pUnit, Event) --@Swoop,n/a--
pUnit:FullCastSpellOnTarget(18144,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_21904', 2304, 1)
end

function Sorts_21904(pUnit, Event)
local choix_sorts_21904 = math.random(0, 2)
if choix_sorts_21904 == 0 then
pUnit:RegisterEvent('spell0_21904', 1, 1)
end
if choix_sorts_21904 == 1 then
pUnit:RegisterEvent('spell1_21904', 1, 1)
end
if choix_sorts_21904 == 2 then
pUnit:RegisterEvent('spell2_21904', 1, 1)
end
end

function mob21904_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21904', math.random(1500, 3000), 1)
end

function mob21904_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21904_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21904_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21904, 1, 'mob21904_Action')
RegisterUnitEvent(21904, 2, 'mob21904_Leave')
RegisterUnitEvent(21904, 3, 'mob21904_Kill')
RegisterUnitEvent(21904, 4, 'mob21904_Die')
